import { createRouter,createWebHashHistory} from 'vue-router';
// import { createRouter, createWebHashHistory } from 'vue-router/dist/vue-router';
 const routes = [
  {
    path: '/',
    component: () => import('../view/Main.vue'),
    redirect:'/home',
    name: 'Main',
    // children:[
    //   {
    //     path: '/home',
    //     name: 'home',
    //     component: () => import('../view/Home/Home.vue')
    //   },
    //   {
    //     path: '/mall',
    //     name: 'mall',
    //     component: () => import('../view/Mall/Mall.vue')
    //   },
    //   {
    //     path: '/user',
    //     name: 'user',
    //     component: () => import('../view/User/User.vue')
    //   },
    //   {
    //     path: '/page1',
    //     name: 'page1',
    //     component: () => import('../view/other/Page1.vue')
    //   },
    //   {
    //     path: '/page2',
    //     name: 'page2',
    //     component: () => import('../view/other/Page2.vue')
    //   }
    // ]
    children:[]
  },
  {
    path: '/login',
    name:'login',
    component: () => import('../view/Login.vue')
  }
 ]

 const router = createRouter({
  history:createWebHashHistory(),
  routes
 })
 export default router